package cn.tqfeiyang.springplus.warehouse.service;

import cn.tqfeiyang.springplus.warehouse.entity.CustomerEntity;
import cn.tqfeiyang.springplus.warehouse.request.CustomerDTO;
import cn.tqfeiyang.springplus.warehouse.response.CustomerVO;
import cn.tqfeiyang.springplus.warehouse.request.CustomerSTO;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.tqfeiyang.springplus.framework.pagination.PageData;

/**
 * 客户服务接口
 *
 * @author tqfeiyang
 * @since 2024-08-01
 */
public interface CustomerService extends IService<CustomerEntity> {

    /**
     * 分页查询客户
     *
     * @param customerSTO 查询数据
     * @return 客户列表
     */
    PageData<CustomerVO> selectCustomerPage(CustomerSTO customerSTO);

    /**
     * 查询客户
     *
     * @param companyId 客户id
     * @return 客户信息
     */
    CustomerVO selectCustomerInfo(Long companyId);

    /**
     * 新建客户
     *
     * @param customerDTO 请求数据
     * @return 客户id
     */
    Long createCustomer(CustomerDTO customerDTO);

    /**
     * 修改客户
     *
     * @param companyId 客户id
     * @param customerDTO 请求数据
     */
    void updateCustomer(Long companyId, CustomerDTO customerDTO);

    /**
     * 删除客户
     *
     * @param companyId 客户id
     */
    void deleteCustomer(Long companyId);
}
